﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PayspanConfigurationManager
{
	using Ninject;

	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main()
		{
			var isAdmin = CrossCutting.Permissions.IsRunAsAdministrator();
			if (!isAdmin && CrossCutting.Permissions.TryAsAdministrator())
			{
				Application.Exit();
				return;
			}

			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			App_Start.NinjectConfig.Start();
			App_Start.NinjectConfig.Run(isAdmin, Application.Run);
			
		}
	}
}
